package com.CST.mapper.cst.ys;

import com.CST.dto.ys.NumAndYardDTO;
import com.CST.dto.ys.YsBusinessBudgetDTO;
import com.CST.entity.ys.YsAccountDetail;
import com.CST.entity.ys.YsModifyRecords;
import com.CST.vo.ys.ExpenseVO;
import com.CST.vo.ys.YsAccountDetailBusinessOrManageVO;
import com.CST.vo.ys.YsModifyRecordVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * 业务预算执行
 * @author chengwen
 */
@Mapper
public interface YsManageBudgetMapper extends BaseMapper<YsAccountDetail> {
    List<YsAccountDetailBusinessOrManageVO> selectYsBudgetList(YsBusinessBudgetDTO ysBusinessBudgetDto);

    int selectByNum(@Param("num") Integer num);

    YsAccountDetailBusinessOrManageVO selectInfoByNum(Integer id);

    int updateAmount(YsAccountDetail ysAccountDetail);

    int deleteByNum(Integer id);

    int insertYsAccountDetailRe(List<YsAccountDetailBusinessOrManageVO> resultList);

    int deleteByDto(YsBusinessBudgetDTO ysBusinessBudgetDto);

    List<YsModifyRecordVO> selectModifyRecordList(YsBusinessBudgetDTO ysBusinessBudgetDto);

    int insertRecord(@Param("info") YsAccountDetailBusinessOrManageVO info, @Param("record") YsModifyRecords record);

    void updateDetailDeleteFlagById(NumAndYardDTO dto);

    int selectRecordById(NumAndYardDTO dto);

    int DeleteRecordById(Integer id);

    int selectMaxId();

    int selectRecordIsExist(Integer num,Integer type);

    int deleteByNumAndDeleteFlag(YsAccountDetail ysAccountDetail);

    List<ExpenseVO> selectYsBudgetListCount(YsBusinessBudgetDTO dto);
}
